/**   
 * Copyright © 2017 Fan_繁. All rights reserved.
 * 
 * @Title: ThreadLocalRountingDataSource.java 
 * @Prject: anger
 * @Package: com.hzt.anger.controller 
 * @Description: TODO
 * @author: ChuanHui   
 * @date: 2017年8月4日 下午8:54:13 
 * @version: V1.0   
 */
package com.hzt.anger.config;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @ClassName: ThreadLocalRountingDataSource
 * @Description: TODO
 * @author: ChuanHui
 * @date: 2017年8月4日 下午8:54:13
 */
public class ThreadLocalRountingDataSource extends AbstractRoutingDataSource {

	/*
	 * (non Javadoc)
	 * 
	 * @Title: determineCurrentLookupKey
	 * 
	 * @Description: 获取当前线程中的数据源
	 * 
	 * @return
	 * 
	 * @see org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource#
	 * determineCurrentLookupKey()
	 */
	@Override
	protected Object determineCurrentLookupKey() {
		// TODO Auto-generated method stub
		return DataSourceTypeManager.get();
	}

}
